/*
Theme Name: Adopt a Grandparent
Description: Custom WordPress theme for NGO donation and adoption platform
Author: Riddhi Sethi
Version: 1.0
*/

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
    color: #666;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-2px);
}

.btn-secondary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #2980b9, #21618c);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: #e74c3c;
    border: 2px solid #e74c3c;
}

.btn-outline:hover {
    background: #e74c3c;
    color: white;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    width: 100%;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.2rem;
    color: #e74c3c;
}

.nav-logo img {
    width: 40px;
    height: 40px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #e74c3c;
}

.nav-buttons {
    display: flex;
    gap: 1rem;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #ffeaa7, #fab1a0);
    padding: 120px 0 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 3rem;
    color: #2d3436;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-text p {
    font-size: 1.2rem;
    color: #636e72;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.hero-stats {
    display: flex;
    gap: 2rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #e74c3c;
}

.stat-label {
    font-size: 0.9rem;
    color: #636e72;
}

.hero-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    color: white;
    text-align: center;
    padding: 120px 0 80px;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Sections */
section {
    padding: 80px 0;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 3rem;
}

/* How It Works */
.how-it-works {
    background: #f8f9fa;
}

.how-it-works h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #2d3436;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.step {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.step:hover {
    transform: translateY(-10px);
}

.step-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2rem;
}

/* Featured Grandparents */
.grandparents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.grandparent-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.grandparent-card:hover {
    transform: translateY(-5px);
}

.grandparent-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.grandparent-info {
    padding: 1.5rem;
}

.grandparent-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 0.5rem;
}

.grandparent-details {
    color: #636e72;
    margin-bottom: 1rem;
}

.grandparent-story {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.progress-bar {
    background: #e9ecef;
    border-radius: 10px;
    height: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(90deg, #00b894, #00a085);
    height: 100%;
    transition: width 0.3s ease;
}

.funding-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.card-buttons {
    display: flex;
    gap: 1rem;
}

.card-buttons .btn {
    flex: 1;
    padding: 10px;
    font-size: 0.9rem;
}

/* Testimonials */
.testimonials {
    background: #f8f9fa;
}

.testimonials h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2d3436;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.testimonial {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.testimonial-content p {
    font-style: italic;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #555;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testimonial-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.testimonial-author h4 {
    margin-bottom: 0.25rem;
    color: #2d3436;
}

.testimonial-author span {
    color: #666;
    font-size: 0.9rem;
}

/* Filters Section */
.filters-section {
    background: #f8f9fa;
    padding: 2rem 0;
}

.filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-box input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.search-box i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 500;
    color: #333;
    font-size: 0.9rem;
}

.filter-group select {
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    min-width: 120px;
}

/* Mission & Vision */
.mission-vision-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 3rem;
}

.mission, .vision {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.mission .icon, .vision .icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2rem;
}

/* Impact Metrics */
.impact-metrics {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.impact-metrics h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.metric {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.metric-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #ffeaa7;
}

.metric-number {
    font-size: 2.5rem;
    font-weight: 700;
    display: block;
    margin-bottom: 0.5rem;
}

.metric-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* Team Section */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.team-member {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.team-member:hover {
    transform: translateY(-5px);
}

.team-member img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
}

.team-member h3 {
    margin-bottom: 0.5rem;
    color: #2d3436;
}

.role {
    color: #e74c3c;
    font-weight: 500;
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #e74c3c;
    color: white;
}

/* CTA Section */
.cta {
    background: linear-gradient(135deg, #fd79a8, #e84393);
    color: white;
    text-align: center;
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Footer */
.footer {
    background: #2d3436;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.footer-logo img {
    width: 40px;
    height: 40px;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: #ffeaa7;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #b2bec3;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: white;
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.5rem;
    color: #b2bec3;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #636e72;
    color: #b2bec3;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-3 {
    margin-bottom: 3rem;
}

/* No Results Styles */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #333;
}

.no-results p {
    font-size: 1rem;
}

/* User Dashboard Styles */
.user-info {
    background: #f8f9fa;
    padding: 40px 0;
    margin-bottom: 30px;
}

.user-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.user-welcome h2 {
    margin-bottom: 5px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.my-adoptions,
.my-donations,
.account-settings {
    margin-bottom: 60px;
}

.adoptions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.adoption-item {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.adoption-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.grandparent-info h3 {
    margin-bottom: 10px;
    color: #333;
}

.adoption-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.status-pending {
    color: #f39c12;
}

.status-approved {
    color: #27ae60;
}

.status-rejected {
    color: #e74c3c;
}

.donations-table {
    overflow-x: auto;
}

.donations-table table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.donations-table th,
.donations-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.donations-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.donations-table tr:last-child td {
    border-bottom: none;
}

.donations-table tr:hover {
    background: #f8f9fa;
}

.no-records {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.no-records p {
    margin-bottom: 20px;
    color: #666;
}

.account-settings .settings-form {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group input:disabled {
    background: #f8f9fa;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .mission-vision-grid {
        grid-template-columns: 1fr;
    }
    
    .filters-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-text h1 {
        font-size: 1.8rem;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .grandparents-grid {
        grid-template-columns: 1fr;
    }
    
    .card-buttons {
        flex-direction: column;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000; /* Above fixed navbar and other overlays */
    overflow-y: auto;
}

.modal-dialog {
    position: relative;
    width: 90%;
    max-width: 600px;
    margin: 50px auto;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.5rem;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    position: relative;
    z-index: 1; /* ensure clickable above content */
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    text-align: right;
}

/* Loading indicator */
.loading {
    text-align: center;
    padding: 30px;
    font-size: 1.2rem;
    color: #666;
}

.loading:after {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border: 3px solid #ddd;
    border-top-color: #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Error message */
.error {
    padding: 15px;
    background-color: #ffebee;
    color: #c62828;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* Login modal form styles */
#login-modal .loginform, #login-modal form#loginform {
    display: grid;
    gap: 12px;
}
#login-modal form#loginform label { font-weight: 600; color:#333; }
#login-modal form#loginform input[type="text"],
#login-modal form#loginform input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
#login-modal form#loginform input[type="text"]:focus,
#login-modal form#loginform input[type="password"]:focus {
    outline: none;
    border-color: #10b5a8;
    box-shadow: 0 0 0 3px rgba(16, 181, 168, 0.15);
}
#login-modal form#loginform .forgetmenot { display:flex; align-items:center; gap:8px; }
#login-modal form#loginform .submit #wp-submit {
    display: block;
    width: 100%;
    background: linear-gradient(180deg, #12c7b8 0%, #10b5a8 100%);
    color: #fff;
    border: none;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(16, 181, 168, 0.3);
    transition: transform 0.05s ease, box-shadow 0.2s ease, background 0.2s ease;
}
#login-modal form#loginform .submit #wp-submit:hover {
    background: linear-gradient(180deg, #14d5c5 0%, #12c7b8 100%);
    box-shadow: 0 8px 18px rgba(16, 181, 168, 0.4);
}
#login-modal form#loginform .submit #wp-submit:active {
    transform: translateY(1px);
}
#login-modal form#loginform .submit #wp-submit:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(16, 181, 168, 0.25);
}

.modal-backdrop {
    z-index:-1;
    opacity: 0.5;
}