/* Goals Grid Styles */
.goals-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); 
    gap: 1.2rem; 
    margin-top: 2rem;
    padding: 0 1rem;
}

.goal-card { 
    background: #fff; 
    border-radius: var(--radius-md); 
    padding: 0; 
    box-shadow: var(--shadow-sm); 
    border-left: 6px solid; 
    transition: all 0.3s ease;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease-out forwards;
    position: relative;
    cursor: pointer;
}

.goal-card:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23333333'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M13 10V3L4 14h7v7l9-11h-7z'/%3E%3C/svg%3E");
    background-size: 18px;
    background-repeat: no-repeat;
    background-position: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.goal-card:not(:last-child):hover::after {
    transform: scale(1.1);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

/* Link Icon */
.goal-link-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1;
}

.goal-link-icon:hover {
    transform: scale(1.1);
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.goal-link-icon svg {
    width: 18px;
    height: 18px;
    color: #333;
}

/* Animation Delays */
.goal-card:nth-child(1) { animation-delay: 0.1s; }
.goal-card:nth-child(2) { animation-delay: 0.2s; }
.goal-card:nth-child(3) { animation-delay: 0.3s; }
.goal-card:nth-child(4) { animation-delay: 0.4s; }
.goal-card:nth-child(5) { animation-delay: 0.5s; }
.goal-card:nth-child(6) { animation-delay: 0.6s; }
.goal-card:nth-child(7) { animation-delay: 0.7s; }
.goal-card:nth-child(8) { animation-delay: 0.8s; }
.goal-card:nth-child(9) { animation-delay: 0.9s; }
.goal-card:nth-child(n+10) { animation-delay: 1s; }

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

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

.goal-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.goal-card:hover .goal-image img {
    transform: scale(1.02);
}

.goal-content {
    padding: 1.5rem;
}

/* Modal Styles */
.sdg-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 1000;
    overflow-y: auto;
}

.modal-content {
    position: relative;
    background: #fff;
    width: 90%;
    max-width: 900px;
    margin: 40px auto;
    border-radius: 12px;
    padding: 0;
    animation: modalSlideIn 0.3s ease-out;
}

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

.modal-branding {
    background: #f8f9fa;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-radius: 12px 12px 0 0;
}

.modal-branding img {
    height: 40px;
    width: auto;
}

.modal-branding-text {
    font-size: 1.1rem;
    color: #333;
    font-weight: 500;
}

.modal-branding-text .sanskrit {
    font-style: italic;
    margin-right: 5px;
}

.modal-header {
    padding: 25px 30px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
}

.modal-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--goal-color, #333);
}

.goal-header-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.goal-icon {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    padding: 10px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.goal-modal-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.goal-title-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.goal-number {
    font-size: 1rem;
    font-weight: 500;
    color: #666;
    text-transform: uppercase;
}

.modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.2;
}

.modal-body {
    padding: 30px;
    max-height: 70vh;
    overflow-y: auto;
}

.goal-stats {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.stat-number {
    font-size: 2rem;
    font-weight: 600;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.goal-overview,
.goal-targets,
.goal-resources {
    margin-bottom: 40px;
}

.goal-overview h3,
.goal-targets h3,
.goal-resources h3 {
    font-size: 1.25rem;
    margin-bottom: 20px;
    color: #333;
}

.goal-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #444;
}

.modal-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 10px;
}

.modal-btn {
    background: none;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-btn:hover {
    background: #f5f5f5;
}

.modal-btn svg {
    width: 20px;
    height: 20px;
    color: #666;
}

/* Modal Content Styles */
.goal-overview {
    margin-bottom: 30px;
}

.goal-targets {
    margin-bottom: 30px;
}

.targets-list {
    display: grid;
    gap: 20px;
}

.target-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s ease;
}

.target-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.target-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.target-number {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    padding: 5px 12px;
    background: #f8f9fa;
    border-radius: 6px;
}

.target-description {
    font-size: 1rem;
    line-height: 1.5;
    color: #444;
    margin-bottom: 20px;
}

.indicators-list {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

.indicators-header {
    font-weight: 500;
    color: #666;
    margin-bottom: 15px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.indicator-item {
    padding: 12px;
    background: #fff;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: #555;
    line-height: 1.4;
}

.indicator-item:last-child {
    margin-bottom: 0;
}

.resources-list {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.resource-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.resource-link svg {
    width: 20px;
    height: 20px;
    color: currentColor;
}

.resource-link:hover {
    background: var(--goal-color, #333);
    color: #fff;
}

/* Animation Keyframes */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Enhanced Interactive Elements */
.indicators-list {
    position: relative;
    overflow: hidden;
}

.indicators-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 10px 15px;
    background: #f1f3f5;
    border-radius: 6px;
    margin-bottom: 10px;
}

.toggle-indicators {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.toggle-indicators svg {
    width: 16px;
    height: 16px;
    color: #666;
}

.toggle-indicators.expanded {
    transform: rotate(180deg);
}

.indicators-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.indicators-list.expanded .indicators-content {
    max-height: 1000px;
}

.indicator-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
    padding: 12px 15px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
}

.indicator-item:hover {
    transform: translateX(5px);
}

.indicator-bullet {
    color: var(--goal-color, #333);
    font-size: 1.2em;
    line-height: 1;
}

/* Share Button Tooltip */
.copy-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    animation: fadeIn 0.3s ease;
}

.copy-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
}

/* Modal Show Animation */
.sdg-modal {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sdg-modal.show {
    opacity: 1;
}

.modal-content {
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.sdg-modal.show .modal-content {
    transform: translateY(0);
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .goals-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.2rem;
    }
    
    .goal-content {
        padding: 1.2rem;
    }

    .modal-content {
        width: 95%;
        margin: 20px auto;
    }
}

@media (max-width: 768px) {
    .goals-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .goal-content {
        padding: 1rem;
    }
    
    .goal-card {
        border-left-width: 4px;
    }

    .modal-header {
        padding: 15px 20px;
    }

    .modal-body {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .goals-grid {
        gap: 0.8rem;
    }
    
    .goal-content {
        padding: 0.8rem;
    }

    .modal-header h2 {
        font-size: 1.2rem;
    }
}
