
/* Reset e base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #d4af37;
    --secondary-color: #8b4513;
    --accent-color: #f5f5dc;
    --text-dark: #333;
    --text-light: #666;
    --white: #ffffff;
    --gradient: linear-gradient(135deg, #d4af37, #f4e4a6);
}

html {
    height: 100%;
    width: 100%;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
    -webkit-transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: 'Dancing Script', cursive;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Music Player and Sound Wave Animation */
.music-player {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 8px 15px;
    transition: transform 0.2s ease;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(5px);
    position: relative;
}

.music-player:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.2);
}

.sound-wave {
    display: flex;
    align-items: flex-end;
    height: 50px;
    gap: 5px;
    min-width: 80px;
    justify-content: center;
}

.wave-bar {
    width: 7px;
    background: linear-gradient(to top, var(--primary-color), #f4e4a6);
    border-radius: 4px;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.wave-bar:nth-child(1) {
    height: 12px;
    animation: wave1 0.9s infinite ease-in-out;
}

.wave-bar:nth-child(2) {
    height: 25px;
    animation: wave2 0.9s infinite ease-in-out 0.1s;
}

.wave-bar:nth-child(3) {
    height: 35px;
    animation: wave3 0.9s infinite ease-in-out 0.2s;
}

.wave-bar:nth-child(4) {
    height: 20px;
    animation: wave4 0.9s infinite ease-in-out 0.3s;
}

.wave-bar:nth-child(5) {
    height: 10px;
    animation: wave5 0.9s infinite ease-in-out 0.4s;
}

/* Wave animations */
@keyframes wave1 {
    0%, 100% { height: 12px; opacity: 0.8; transform: scaleY(1); }
    50% { height: 28px; opacity: 1; transform: scaleY(1.1); }
}

@keyframes wave2 {
    0%, 100% { height: 25px; opacity: 0.8; transform: scaleY(1); }
    50% { height: 42px; opacity: 1; transform: scaleY(1.1); }
}

@keyframes wave3 {
    0%, 100% { height: 35px; opacity: 0.8; transform: scaleY(1); }
    50% { height: 50px; opacity: 1; transform: scaleY(1.1); }
}

@keyframes wave4 {
    0%, 100% { height: 20px; opacity: 0.8; transform: scaleY(1); }
    50% { height: 38px; opacity: 1; transform: scaleY(1.1); }
}

@keyframes wave5 {
    0%, 100% { height: 10px; opacity: 0.8; transform: scaleY(1); }
    50% { height: 22px; opacity: 1; transform: scaleY(1.1); }
}

/* When music is paused */
.music-player.paused .wave-bar {
    animation: none !important;
    opacity: 0.3;
    transform: scaleY(1) !important;
    box-shadow: none;
}

.music-player.paused .wave-bar:nth-child(1) { height: 8px !important; }
.music-player.paused .wave-bar:nth-child(2) { height: 12px !important; }
.music-player.paused .wave-bar:nth-child(3) { height: 15px !important; }
.music-player.paused .wave-bar:nth-child(4) { height: 10px !important; }
.music-player.paused .wave-bar:nth-child(5) { height: 6px !important; }

/* Adicionar indicador visual de que a música está disponível */
.music-player::after {
    content: "🎵";
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 12px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.music-player:not(.paused)::after {
    opacity: 1;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.2); opacity: 1; }
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
}

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

.admin-link {
    opacity: 0.3;
    font-size: 0.8rem;
}

.hamburger {
    display: none;
    flex-direction: column;
    -webkit-flex-direction: column;
    cursor: pointer;
    min-height: 44px; /* iOS touch target */
    min-width: 44px;
    justify-content: center;
    -webkit-justify-content: center;
    align-items: center;
    -webkit-align-items: center;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    height: 100vh;
    min-height: -webkit-fill-available;
    background-image: 
        linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)),
        url('../appfotos/9.jpeg');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: scroll; /* iOS Safari fix */
    display: flex;
    display: -webkit-flex;
    align-items: center;
    -webkit-align-items: center;
    justify-content: center;
    -webkit-justify-content: center;
    text-align: center;
    color: white;
    position: relative;
}

.hero-content {
    z-index: 2;
}

.couple-names {
    font-family: 'Dancing Script', cursive;
    font-size: 4rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.wedding-date {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

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

.cta-button {
    background: var(--gradient);
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    min-height: 44px; /* iOS touch target minimum */
    min-width: 44px;
    transition: transform 0.3s ease;
    -webkit-transition: transform 0.3s ease;
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
    -webkit-appearance: none;
    -webkit-user-select: none;
    user-select: none;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
}

/* Sections */
section {
    padding: 80px 0;
}

section h2 {
    text-align: center;
    font-family: 'Dancing Script', cursive;
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 3rem;
}

/* Save the Date */
.save-the-date {
    background: var(--accent-color);
}

.save-content {
    display: grid;
    display: -ms-grid;
    grid-template-columns: 1fr 1fr;
    -ms-grid-columns: 1fr 4rem 1fr;
    gap: 4rem;
    align-items: center;
    -webkit-align-items: center;
}

.media-gallery {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.media-item {
    display: none;
}

.media-item.active {
    display: block;
}

.media-item img,
.media-item video {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.media-controls {
    text-align: center;
    margin-top: 1rem;
}

.media-controls button {
    background: var(--primary-color);
    border: none;
    color: white;
    padding: 10px 15px;
    margin: 0 5px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s ease;
}

.media-controls button:hover {
    background: var(--secondary-color);
}

.save-info h3 {
    font-family: 'Dancing Script', cursive;
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

.countdown {
    display: flex;
    display: -webkit-flex;
    justify-content: center;
    -webkit-justify-content: center;
    gap: 2rem;
}

.countdown-item {
    text-align: center;
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.countdown-item span {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.countdown-item label {
    font-size: 0.9rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Nossa História */
.nossa-historia {
    background: white;
}

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

.timeline::after {
    content: '';
    position: absolute;
    width: 6px;
    background: var(--gradient);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -3px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background: inherit;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 25px;
    right: -17px;
    background: var(--primary-color);
    border: 4px solid white;
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(even)::after {
    left: -16px;
}

.timeline-date {
    background: var(--gradient);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    display: inline-block;
    font-weight: 600;
    margin-bottom: 1rem;
}

.timeline-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.timeline-content h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

/* O Evento */
.evento {
    background: var(--accent-color);
}

.evento-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.evento-card {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

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

.evento-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.evento-card h3 {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.evento-card p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.btn-mapa {
    background: var(--gradient);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: transform 0.3s ease;
    margin-top: 1rem;
}

.btn-mapa:hover {
    transform: translateY(-2px);
}

.dress-code {
    text-align: center;
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.dress-code h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

/* Lista de Presentes */
.presentes {
    background: white;
}

.presentes-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.presentes-grid {
    display: grid;
    display: -ms-grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.presente-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

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

.presente-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.presente-content {
    padding: 1.5rem;
}

.presente-content h3 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.presente-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 1rem 0;
}

.presente-description {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.btn-selecionar {
    background: var(--gradient);
    border: none;
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    width: 100%;
    font-size: 1rem;
    min-height: 44px; /* iOS touch target minimum */
    transition: transform 0.3s ease;
    -webkit-transition: transform 0.3s ease;
    -webkit-appearance: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.btn-selecionar:hover {
    transform: translateY(-2px);
}

.btn-selecionar:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* ===== LOADING ANIMADO FOFO PARA CASAMENTO ===== */
.btn-loading {
    position: relative;
    background: var(--gradient) !important;
    color: transparent !important;
    pointer-events: none;
    overflow: hidden;
}

.wedding-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Animação de corações pulsando */
.heart-pulse {
    width: 16px;
    height: 16px;
    position: relative;
    animation: heart-beat 1.5s ease-in-out infinite;
}

.heart-pulse:before,
.heart-pulse:after {
    content: '';
    width: 8px;
    height: 12px;
    position: absolute;
    left: 8px;
    top: 0;
    background: #fff;
    border-radius: 8px 8px 0 0;
    transform: rotate(-45deg);
    transform-origin: 0 100%;
}

.heart-pulse:after {
    left: 0;
    transform: rotate(45deg);
    transform-origin: 100% 100%;
}

/* Animação de anel girando */
.ring-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid transparent;
    border-top: 2px solid #fff;
    border-right: 2px solid #fff;
    border-radius: 50%;
    animation: ring-spin 1.2s linear infinite;
}

/* Texto de loading */
.loading-text {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    animation: text-fade 2s ease-in-out infinite;
}

/* Keyframes das animações */
@keyframes heart-beat {
    0%, 100% { 
        transform: scale(1);
        opacity: 0.8;
    }
    50% { 
        transform: scale(1.3);
        opacity: 1;
    }
}

@keyframes ring-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes text-fade {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Efeito de brilho no botão durante loading */
.btn-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Versão compacta para botões menores */
.btn-loading-compact .wedding-loader {
    gap: 6px;
}

.btn-loading-compact .heart-pulse {
    width: 14px;
    height: 14px;
}

.btn-loading-compact .heart-pulse:before,
.btn-loading-compact .heart-pulse:after {
    width: 7px;
    height: 10px;
}

.btn-loading-compact .ring-spinner {
    width: 16px;
    height: 16px;
    border-width: 1.5px;
}

.btn-loading-compact .loading-text {
    font-size: 0.8rem;
}

/* Admin Panel */
.admin-panel {
    background: #f8f9fa;
    padding: 3rem 0;
}

.admin-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.admin-form {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.admin-form h3 {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.admin-form input,
.admin-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 16px; /* Prevents zoom on iOS */
    -webkit-appearance: none;
    -webkit-border-radius: 8px;
}

.admin-form input:focus,
.admin-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.admin-form button {
    background: var(--gradient);
    border: none;
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    width: 100%;
    font-size: 1rem;
}

.admin-gifts {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.admin-gift-item {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-gift-item:last-child {
    border-bottom: none;
}

.btn-remove {
    background: #dc3545;
    border: none;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
}

/* Contato */
.contato {
    background: var(--accent-color);
}

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

.contato-item {
    text-align: center;
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.contato-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.contato-item h3 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

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

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    position: relative;
    max-height: 80vh;
    max-height: -webkit-fill-available;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
}

.close:hover {
    color: #333;
}

.modal-gift-info {
    text-align: center;
}

.modal-gift-image {
    width: 100%;
    max-width: 300px;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.qr-code {
    margin: 2rem 0;
    text-align: center;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 15px;
    border: 1px solid #e9ecef;
}

.qr-code h4 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.qr-code img {
    width: 300px;
    height: 300px;
    max-width: 100%;
    border: 2px solid #dee2e6;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    background: white;
    padding: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.qr-code img:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

#gift-confirmation-form {
    margin-top: 2rem;
}

#gift-confirmation-form input,
#gift-confirmation-form label {
    margin-bottom: 1rem;
    display: block;
    width: 100%;
}

#gift-confirmation-form input {
    font-size: 16px; /* Prevents zoom on iOS */
    -webkit-appearance: none;
    border-radius: 8px;
    -webkit-border-radius: 8px;
    padding: 12px;
    border: 2px solid #ddd;
}

#gift-confirmation-form label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: auto;
}

#gift-confirmation-form button {
    background: var(--gradient);
    border: none;
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    margin: 0.5rem;
    font-size: 1rem;
}

#gift-confirmation-form button[type="button"] {
    background: #6c757d;
}

/* Responsive - Tablet and Mobile */
@media (max-width: 768px) {
    body {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        -webkit-flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        -webkit-transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
        padding: 2rem 0;
        z-index: 1001;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .couple-names {
        font-size: 2.5rem;
    }
    
    .hero {
        min-height: 100vh;
        min-height: -webkit-fill-available;
    }
    
    .save-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .countdown {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .countdown-item {
        flex: 1;
        min-width: 120px;
    }
    
    .timeline::after {
        left: 31px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    
    .timeline-item::after {
        left: 15px;
    }
    
    .timeline-item:nth-child(even) {
        left: 0%;
    }
    
    .timeline-item:nth-child(even)::after {
        left: 15px;
    }
    
    .evento-info {
        grid-template-columns: 1fr;
    }
    
    .admin-content {
        grid-template-columns: 1fr;
    }
    
    .presentes-grid {
        grid-template-columns: 1fr;
    }
}

/* iPhone and small mobile devices */
@media (max-width: 480px) {
    html {
        -webkit-text-size-adjust: 100%;
    }
    
    body {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .container {
        padding: 0 15px;
    }
    
    section {
        padding: 60px 0;
    }
    
    section h2 {
        font-size: 2rem;
    }
    
    .couple-names {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero {
        padding: 0 20px;
        min-height: 100vh;
        min-height: -webkit-fill-available;
    }
    
    .nav-logo {
        font-size: 1.5rem;
    }
    
    .modal-content {
        margin: 2% auto;
        padding: 1.5rem;
        width: 95%;
        max-height: 90vh;
        max-height: -webkit-fill-available;
    }
    
    .photographer-popup {
        width: 95%;
        margin: 5% auto;
    }
    
    .btn-selecionar,
    .cta-button,
    .admin-form button {
        min-height: 48px; /* Better touch target for iPhone */
        font-size: 16px; /* Prevent zoom */
    }
}

/* Estilos para admin escondido e popup fotógrafo */
.admin-link.hidden {
    display: none !important;
}

.admin-link.visible {
    display: inline !important;
}

/* Popup do fotógrafo - Versão centralizada e moderna */
.photographer-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    -webkit-transform: translate(-50%, -50%) scale(0.7);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    width: 450px;
    max-width: 90vw;
    cursor: default;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    -webkit-transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2000;
    overflow: hidden;
    border: 3px solid rgba(255,255,255,0.2);
    -webkit-user-select: none;
    user-select: none;
}

.photographer-popup.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.photographer-popup-header {
    position: relative;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    padding: 20px;
    text-align: center;
    background-image: url('https://images.unsplash.com/photo-1502920917128-1aa500764cbd?w=450&h=150&fit=crop&crop=center');
    background-size: cover;
    background-position: center;
    background-blend-mode: overlay;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photographer-popup-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,107,107,0.8), rgba(238,90,36,0.8));
    z-index: 1;
}

.photographer-popup-header > * {
    position: relative;
    z-index: 2;
}

.photographer-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 3;
    backdrop-filter: blur(10px);
}

.photographer-popup-close:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

.photographer-popup-content {
    padding: 30px;
    text-align: center;
    background: white;
    color: #333;
}

.photographer-popup h3 {
    margin: 0 0 15px 0;
    font-size: 1.8rem;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Dancing Script', cursive;
}

.photographer-popup p {
    margin: 10px 0;
    font-size: 1.1rem;
    line-height: 1.5;
    color: #666;
}

.photographer-popup-camera {
    font-size: 3rem;
    margin: 10px 0;
    display: block;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.photographer-popup-connect-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.photographer-popup-connect-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.photographer-popup-badge {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    display: inline-block;
    margin-top: 10px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 107, 107, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 107, 107, 0);
    }
}

/* Backdrop do popup */
.photographer-popup-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 1999;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(3px);
}

.photographer-popup-backdrop.show {
    opacity: 1;
}

/* Estilos para o modal de conexão */
.connection-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.connection-modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 500px;
    margin: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.connection-modal h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-family: 'Dancing Script', cursive;
}

.connection-modal input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.connection-modal input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.connection-modal button {
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.connection-modal button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Novos estilos para sistema de presentes com 3 opções */
.presente-progress {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1rem;
    margin: 1rem 0;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), #f4e4a6);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.9rem;
    color: var(--text-dark);
    margin: 0;
    text-align: center;
}

.remaining-amount {
    font-size: 0.8rem;
    color: var(--text-light);
    margin: 0.25rem 0 0 0;
    text-align: center;
}

.presente-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-presente-option {
    background: var(--gradient);
    border: none;
    color: white;
    padding: 10px 8px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-presente-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-presente-option span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.btn-presente-option .btn-icon {
    display: inline-flex;
    align-items: center;
    margin-right: 0.4rem;
}

.btn-presente-option .btn-text {
    display: inline-flex;
    align-items: center;
}

.btn-presente-option:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    opacity: 0.6;
}

.btn-send {
    background: linear-gradient(135deg, #17a2b8, #138496);
}

.btn-send:hover {
    background: linear-gradient(135deg, #138496, #117a8b);
}

.btn-value {
    background: linear-gradient(135deg, #f1c40f, #f39c12);
    border: 1.5px solid #f1c40f !important;
    color: #f1c40f !important;
}

.btn-value:hover {
    background: linear-gradient(135deg, #e6b800, #d4af37)!important;
    border-color: #d4af37;
    color: white!important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(241, 196, 15, 0.3);
}


.btn-buy {
    background: linear-gradient(135deg, #28a745, #218838);
}

.btn-buy:hover {
    background: linear-gradient(135deg, #218838, #1e7e34);
}

/* Responsivo para botões em telas menores */
@media (max-width: 768px) {
    .presente-buttons {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .btn-presente-option {
        font-size: 0.9rem;
        padding: 12px 15px;
    }
}

/* ===== MELHORIAS DOS CARDS DE PRESENTES ===== */

/* Cards com altura fixa e layout flexbox para uniformidade */
.presentes-grid {
    align-items: stretch;
}

/* Aumenta a especificidade usando o seletor pai */
.presentes .presente-card {
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(212, 175, 55, 0.1);
    overflow: hidden;
}

.presentes .presente-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 60px rgba(0,0,0,0.25), 0 10px 30px rgba(212, 175, 55, 0.2);
    border-color: rgba(212, 175, 55, 0.6);
    border-width: 3px;
}

.presentes .presente-image {
    min-height: 180px!important;
    height: 180px; /* Altura reduzida para dar mais espaço ao conteúdo */
    object-fit: contain;
    flex: 0 0 180px;
}

.presentes .presente-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.2rem;
    min-height: 0; /* Importante para flexbox funcionar corretamente */
}

/* Controle de texto - expansão apenas no hover no desktop */
.presentes .presente-description {
    color: var(--text-light);
    line-height: 1.6;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
    max-height: 3.2em; /* 2 linhas */
    flex: 0 0 auto;
}

/* Desktop: expansão no hover */
@media (min-width: 769px) {
    .presentes .presente-card:hover .presente-description {
        -webkit-line-clamp: unset;
        max-height: none;
        overflow: visible;
        display: block;
    }
}

/* Mobile: sempre expandido */
@media (max-width: 768px) {
    .presentes .presente-description {
        -webkit-line-clamp: unset;
        max-height: none;
        overflow: visible;
        display: block;
    }
}

/* Barra de progresso - oculta por padrão no desktop, visível no hover */
.presentes .presente-progress {
    background: rgba(248, 249, 250, 0.9);
    border-radius: 12px;
    padding: 0.8rem;
    margin: 0.5rem 0;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease;
    border-left: 3px solid var(--primary-color);
    flex: 0 0 auto;
}

/* Desktop: mostrar no hover */
@media (min-width: 769px) {
    .presentes .presente-card:hover .presente-progress {
        opacity: 1;
        max-height: 120px;
    }
}

/* Mobile: sempre visível */
@media (max-width: 768px) {
    .presentes .presente-progress {
        opacity: 1;
        max-height: 120px;
    }
}

/* Melhorias na barra de progresso */
.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(233, 236, 239, 0.8);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0.75rem;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), #f4e4a6);
    border-radius: 6px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    font-size: 0.85rem;
    color: var(--text-dark);
    margin: 0;
    text-align: center;
    font-weight: 600;
}

.remaining-amount {
    font-size: 0.75rem;
    color: var(--primary-color);
    margin: 0.5rem 0 0 0;
    text-align: center;
    font-weight: 500;
}

/* Redesign dos botões - mais elegante e fino */
.presentes .presente-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.8rem;
    flex: 0 0 auto;
}

.presentes .btn-presente-option {
    background: transparent;
    border: 1.5px solid;
    color: var(--text-dark);
    padding: 8px 16px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    width: 100%;
}

/* Efeito de fundo deslizante */
.btn-presente-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    transition: left 0.3s ease;
    z-index: 0;
}

.btn-presente-option span {
    position: relative;
    z-index: 1;
}

/* Estilos específicos para cada botão */
.presentes .btn-send {
    border-color: #17a2b8;
    color: #17a2b8;
}

.btn-send::before {
    background: linear-gradient(135deg, #17a2b8, #138496);
}

.presentes .btn-send:hover {
    background: #17a2b8;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
}

.btn-send:hover::before {
    left: 0;
}

.presentes .btn-partial {
    border-color: #ffc107;
    color: #ffc107;
}

.btn-partial::before {
    background: linear-gradient(135deg, #ffc107, #e0a800);
}

.presentes .btn-partial:hover {
    background: #ffc107;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.btn-partial:hover::before {
    left: 0;
}

.presentes .btn-buy {
    border-color: #28a745;
    color: #28a745;
}

.btn-buy::before {
    background: linear-gradient(135deg, #28a745, #218838);
}

.presentes .btn-buy:hover {
    background: #28a745;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-buy:hover::before {
    left: 0;
}

.presentes .btn-presente-option:disabled {
    border-color: #6c757d;
    color: #6c757d;
    cursor: not-allowed;
    transform: none;
    opacity: 0.6;
}

.btn-presente-option:disabled::before {
    display: none;
}

.btn-presente-option:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Responsivo para mobile - cards com altura automática */
@media (max-width: 768px) {
    .presentes .presente-card {
        height: auto;
        min-height: 400px;
        overflow: visible;
    }
    
    .presentes .presente-buttons {
        flex-direction: column;
        gap: 0.6rem;
    }
    
    .presentes .btn-presente-option {
        font-size: 0.85rem;
        padding: 10px 16px;
        border-radius: 20px;
    }
}

/* ===== ESTILOS ADMIN PANEL ===== */

/* Lista de presentes do admin */
.admin-gift-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border-left: 3px solid var(--primary-color);
}

.admin-gift-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-edit, .btn-remove, .btn-cancel {
    padding: 6px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-edit {
    background: #17a2b8;
    color: white;
}

.btn-edit:hover {
    background: #138496;
    transform: translateY(-1px);
}

.btn-remove {
    background: #dc3545;
    color: white;
}

.btn-remove:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.btn-cancel {
    background: #6c757d;
    color: white;
}

.btn-cancel:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

/* Modal de edição */
.form-group {
    margin-bottom: 1rem;
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9rem;
    background-color: #ffffff;
    color: var(--text-dark);
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

/* Estilos específicos para os modais de presentes */
#buy-gift-modal .form-group,
#send-gift-modal .form-group,
#send-value-modal .form-group {
    margin-bottom: 1.5rem;
}

#buy-gift-modal .form-group label,
#send-gift-modal .form-group label,
#send-value-modal .form-group label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    display: block;
}

#buy-gift-modal .form-group input,
#send-gift-modal .form-group input,
#send-value-modal .form-group input,
#buy-gift-modal .form-group textarea,
#send-gift-modal .form-group textarea,
#send-value-modal .form-group textarea {
    background-color: #f8f9fa;
    border: 2px solid #ced4da;
    color: #495057;
    font-size: 1rem;
    padding: 1rem;
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
}

#buy-gift-modal .form-group input:focus,
#send-gift-modal .form-group input:focus,
#send-value-modal .form-group input:focus,
#buy-gift-modal .form-group textarea:focus,
#send-gift-modal .form-group textarea:focus,
#send-value-modal .form-group textarea:focus {
    background-color: #ffffff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.25);
}

#buy-gift-modal .form-group input::placeholder,
#send-gift-modal .form-group input::placeholder,
#send-value-modal .form-group input::placeholder,
#buy-gift-modal .form-group textarea::placeholder,
#send-gift-modal .form-group textarea::placeholder,
#send-value-modal .form-group textarea::placeholder {
    color: #6c757d;
    opacity: 0.7;
}

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

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Container para imagem com selo */
.presente-image-container {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.presente-image-container .presente-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Selo posicionado sobre a imagem */
.presente-image-container .selo-completo {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 100px;
    height: auto;
    z-index: 3;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
    animation: sealAppear 0.8s ease-out;
}

/* Selo de Presente Completo com selo.png */
.presente-card-completed {
    position: relative;
    /* Removida a opacidade para que não fique opaco */
    transition: opacity 0.3s ease;
}

.selo-completo-container {
    text-align: center;
    padding: 1rem;
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 100%);
    border-radius: 12px;
    margin: 1rem 0;
    border: 2px solid #28a745;
    position: relative;
    z-index: 2;
}

.complete-message {
    font-size: 1rem;
    color: #28a745;
    font-weight: 600;
    text-align: center;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

@keyframes sealAppear {
    0% {
        opacity: 0;
        transform: scale(0.8) rotate(-10deg);
    }
    50% {
        transform: scale(1.05) rotate(2deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}
